/*
 * 
 * Copyright (C) 2010 Wilfried Elmenreich, Anita Sobe 
 * This file is part of VideoNetwork.
 * 
 * VideoNetwork is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 
 * You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. 
 */
package consumer;

import proxy.VideoUnit;


/**
 * A viewing references to a single video unit and contains the time when video over
 */

public class Viewing {
	private VideoUnit videoUnit;
	private double viewStartTime;
	private double viewEndTime;
	private double requestTime;
	private double deadline;


	public Viewing(VideoUnit videoUnit, double simTime) {
		this.videoUnit=videoUnit;
		requestTime=simTime;
		viewStartTime=Double.MAX_VALUE;
		viewEndTime=Double.MAX_VALUE;
	}

	public VideoUnit getVideoUnit() {
		return videoUnit;
	}

	public double getViewStartTime() {
		return viewStartTime;
	}

	public double getViewEndTime() {
		return viewEndTime;
	}

	public double getRequestTime() {
		return requestTime;
	}

	public void setViewStartTime(double simTime) {
		viewStartTime=simTime;
	}

	public void setViewEndTime(double simTime) {
		this.viewEndTime = simTime; 
		
	}
	public void setRequestTime(double requestTime) {
		this.requestTime = requestTime;
	}
	
	public void setDeadline(double deadline){
		this.deadline=deadline;
	}
	
	public double getDeadline(){
		return this.deadline;
	}
}
